﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Xml.Linq;

namespace TeacherLoad.Classes
{
    internal class UchGroup
    {
        private int _id = 0;
        private int _course = 0;
        private string _name = "Нет данных для отображения";
        private int _idSpec = 0;
        private int _beginYear = 0;
        private int _idUchPlan = 0;
        private string _specName = string.Empty;

        public int Id { get => _id; set => _id = value; }
        public int Course { get => _course; set => _course = value; }
        public string Name { get => _name; set => _name = value; }
        public int IdSpec { get => _idSpec; set => _idSpec = value; }
        public int BeginYear { get => _beginYear; set => _beginYear = value; }
        public int IdUchPlan { get => _idUchPlan; set => _idUchPlan = value; }
        public string BeginYearStr
        {
            get
            {
                if (_beginYear == 0)
                    return "";
                return "(" + _beginYear + ")";
            }
        }
        public string SpecName
        {
            get => _specName;
            set => _specName = value;
        }

        public UchGroup() { }

        public UchGroup(int id, int course, string name, int idSpec, int beginYear, int idUchPlan, string specName = "")
        {
            Id = id;
            Course = course;
            Name = name;
            IdSpec = idSpec;
            BeginYear = beginYear;
            IdUchPlan = idUchPlan;
            SpecName = specName;
        }

        public override string ToString()
        {
            return Name;
        }
    }
}
